import re

s = 'AB8C27F129'

# 尝试从字符串首字母开始匹配
r = re.match('\\d', s)
print(r)
print(r)

# 尝试搜索字符串直到匹配到,就立即停止搜索
r1 = re.search('\\d', s)
print(r1)
print(r1.span())
print(r1.group())


r2 = re.findall('\\d', s)
print(r2)
